package com.threaddemo6;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class NewWorkStealingPool {
    public static void main(String[] args) throws InterruptedException {
        ExecutorService wsp = Executors.newWorkStealingPool();

        for (int i = 0; i < 10; i++) {
            wsp.execute(()-> System.out.println("执行 - " + Thread.currentThread().getName()));
        }

        Thread.sleep(1000 * 10);

        wsp.shutdown();

    }
}
